#!/usr/bin/env python3
"""
健康检查脚本，用于容器的健康检查
"""
import sys
import requests

try:
    response = requests.get('http://localhost:80/health/', timeout=10)
    if response.status_code == 200:
        print('Health check passed!')
        sys.exit(0)
    else:
        print(f'Health check failed with status code: {response.status_code}')
        sys.exit(1)
except Exception as e:
    print(f'Health check failed with error: {str(e)}')
    sys.exit(1)
